import ajax from '@/utils/request'


export function captchaImageFn() {

  return ajax({
    url: '/captcha/image',
    method: 'get',
    headers: {
      platform: 'APP'
    },


  })

}

export function sendSmsCaptchaFn(captchaCode, captchaKey, mobile) {
  return ajax({

    method: 'POST',
    url: '/captcha/sendSmsCaptcha',
    headers: {
      platform: 'APP',
      "Content-Type": 'application/json'
    },
    data: {
      form: {
        captchaCode,
        captchaKey,
        mobile,
      }
    }
  })
}




export function passportLoginFn(mobile, smsCode) {
  return ajax({
    url: '/passport/login',
    method: 'POST',
    headers: {
      platform: 'APP',
      "Content-Type": 'application/json'

    },
    data: {
      form: {
        isParty: false,
        partyData: {},
        mobile,
        smsCode
      }
    }
  })
}
